package day1108_2;

import java.io.*;

public class Z1 {//BufferedInputStream属于过滤流，不能单独用
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis=new BufferedInputStream(//1.
                new FileInputStream("src\\main\\java\\day1108_2\\Z1.java"));
        BufferedOutputStream bos=new BufferedOutputStream(
                new FileOutputStream("src\\main\\java\\day1108_2\\Z1_bak.java")
        );//一

        byte[]  bs=new byte[1024];//1M
        // bis.read(bs)结果是将数据放入bs数组了，并返回本次读取的字节数
        while(   bis.read(bs)  !=   -1  ){
            bos.write(bs);//二
        }
        bos.close();//三
        bis.close();//3.
    }
}
